-- card: 16011 from stack: in.25 -- bmap block id: 17280 -- flags: 4000 -- background id: 2780 -- name: Student Directory ----- HyperTalk script ----- on opencard set the scroll of card field "directory" to 0 end opencard -- part 1 (field) -- low flags: 01 -- high flags: 0007 -- rect: left=18 top=62 right=320 bottom=344 -- title width / last selected line: 0 -- icon id / first selected line: 0 / 0 -- text alignment: 0 -- font id: 4 -- text size: 9 -- style flags: 0 -- line height: 12 -- part name: Directory ----- HyperTalk script ----- on mousedown global cardOffset set the locktext of me to false click at the clickloc click at the clickloc set the locktext of me to true put clickline()+cardOffset into cardnum visual effect venetian blinds fast go to card cardnum end mousedown function Clickline return((scroll of the target + (item 2 of the clickloc - item 2 of the rect of the target)) div the textheight of the target)+1 end Clickline -- part 2 (button) -- low flags: 00 -- high flags: A003 -- rect: left=352 top=269 right=292 bottom=480 -- title width / last selected line: 0 -- icon id / first selected line: 0 / 0 -- text alignment: 1 -- font id: 0 -- text size: 12 -- style flags: 0 -- line height: 16 -- part name: Refresh Directory ----- HyperTalk script ----- on mouseUp answer "Include students who withdrew?" with "yes" or "no" or "Cancel" if it is "yes" then put true into dodrop else if it is "no" then put false into dodrop else exit mouseup end if global cardOffset put empty into card field "directory" set the lockscreen to true push card go card "first record" get the number of this card put it into start get the number of last card put it into finish put empty into stringhold pop card set the lockscreen to false repeat with count = start to finish push card set the lockscreen to true go card count if (bkgnd field "withdrew" is empty) or (dodrop) then get field "last name" put sixteentab(it) into stringhold get field "first name" put stringhold&&twelvetab(it)into stringhold get field "SS number" put stringhold&&it into stringhold if bkgnd field "withdrew" is not empty then put stringhold&&"w" into stringhold end if put count-cardOffset into lineNumber pop card set the lockscreen to false put stringhold into line lineNumber of card field "Directory" else pop card set the lockscreen to false end if end repeat beep end mouseUp function sixteentab instring get the length of instring put it into howlong put 16-howlong into spacer repeat with count=1 to spacer put space after instring end repeat return instring end sixteentab function twelvetab instring get the length of instring put it into howlong put 12-howlong into spacer repeat with count=1 to spacer put space after instring end repeat return instring end twelvetab -- part 3 (button) -- low flags: 00 -- high flags: A003 -- rect: left=355 top=297 right=319 bottom=477 -- title width / last selected line: 0 -- icon id / first selected line: 0 / 0 -- text alignment: 1 -- font id: 0 -- text size: 12 -- style flags: 0 -- line height: 16 -- part name: Clear Directory ----- HyperTalk script ----- on mouseUp answer "This will erase the directory" with "Cancel" or "OK" if it is "OK" then put empty into card field "directory" put "Click REFRESH Button To Build A New Directory" into line 3 of card field "directory" end if end mouseUp -- part 5 (button) -- low flags: 00 -- high flags: A003 -- rect: left=360 top=35 right=57 bottom=460 -- title width / last selected line: 0 -- icon id / first selected line: 0 / 0 -- text alignment: 1 -- font id: 0 -- text size: 12 -- style flags: 0 -- line height: 16 -- part name: to Records ----- HyperTalk script ----- on mouseUp visual effect dissolve go card "first record" end mouseUp -- part 6 (button) -- low flags: 00 -- high flags: A003 -- rect: left=430 top=166 right=185 bottom=478 -- title width / last selected line: 0 -- icon id / first selected line: 0 / 0 -- text alignment: 1 -- font id: 0 -- text size: 12 -- style flags: 0 -- line height: 16 -- part name: help ----- HyperTalk script ----- on mouseUp set visible of card field "help" to not the visible of card field "help" end mouseUp -- part 7 (field) -- low flags: 81 -- high flags: 2004 -- rect: left=21 top=65 right=291 bottom=323 -- title width / last selected line: 0 -- icon id / first selected line: 0 / 0 -- text alignment: 0 -- font id: 3 -- text size: 9 -- style flags: 0 -- line height: 12 -- part name: help ----- HyperTalk script ----- on mouseup hide card field "help" end mouseup -- part contents for card part 7 ----- text ----- The "Refresh Directory" button will delete the old directory and construct a new one using current information from the Student Records section of the Gradebook. Once the directory is constructed, clicking on an entry will take you directly to that student's record card. The "Clear Directory" button will delete all data from the directory, leaving it blank. The "To Records" button returns you to the Student Records section of the Gradebook.